//
//  DCUnknownBVNCell.m
//  Demo
//
//  Created by zhaolin on 2023/1/12.
//

#import "DCUnknownBVNCell.h"
#import "DCAuthInfoUIModel.h"


@interface DCUnknownBVNCell ()

@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, strong) UIButton *contentBtn;


@property (nonatomic, strong) DCAuthInfoUIModel *model;

@end
@implementation DCUnknownBVNCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self confiugreUI];
    }
    return self;
}

- (void)configureDataWithModel:(DCAuthInfoUIModel *)model {
    _model = model;
    _titleLabel.text = model.title;
}

- (void)confiugreUI {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = [UIColor colorWithString:@"#FFFFFF"];
    _titleLabel = [UILabel new];
    _titleLabel = [UILabel new];
    _titleLabel.text = @"Don’t know your BVN?";
    _titleLabel.textColor = [UIColor colorWithString:@"#1C221B"];
    _titleLabel.font = DCFont_PF_Regular(13);
    [self.contentView addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(24);
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
        make.width.mas_equalTo(140);
    }];
    
    _contentBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _contentBtn.backgroundColor = [UIColor colorWithString:@"#F0FFCE"];
    [_contentBtn setTitle:@"Dial*565*0#" forState:UIControlStateNormal];
    [_contentBtn setTitleColor:[UIColor colorWithString:@"#1C221B"] forState:UIControlStateNormal];
    _contentBtn.titleLabel.font = DCFont_PF_Semibold(14);
    [_contentBtn addTarget:self action:@selector(contentButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:_contentBtn];
    [_contentBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(_titleLabel.mas_right).mas_offset(20);
        make.right.mas_equalTo(-55);
        make.height.mas_equalTo(40);
        make.centerY.mas_equalTo(_titleLabel.mas_centerY);
    }];
    
}

- (void)contentButtonAction:(UIButton *)sender {
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
